package research.ui.editors.tableeditors.filmtype;

import org.eclipse.jface.viewers.ITableLabelProvider;

import research.domain.DefaultParameterValue;
import research.ui.editors.tableeditors.EntityLabelProvider;

public class FilmTypeLabelProvider 
	extends EntityLabelProvider
	implements ITableLabelProvider {
	
	@Override
	public String getColumnText(Object element, int columnIndex) {
		String result = "";
		DefaultParameterValue par = (DefaultParameterValue) element;
		switch (columnIndex) {
			case 0:
				result = par.getParameter().getName();
				break;
			case 1:
				result = par.getParameter().getUnits();
				break;
			case 2:
				result =  render(par.getValue());
				break;
			case 3:
				result = render(par.getParameter().getLow());
				break;
			case 4:
				result = render(par.getParameter().getHigh());
				break;
			default :
				break; 	
		}
		return result;
	}
}
